<!--最新图库 start-->
<div class="layout960 index-newpics">
	<div class="index-title fn-clear">
		<h2>最新图库</h2>
		<div class="index-auto-search fn-left ml20">
			<form action="{url('auto/search')}" target="_blank">
				<span class="fn-left">按价格查询</span>
				<select id="index-auto-price" name="p" class="fn-left">
					<option value="0">请选择价格</option>
					<option value="10">10万以下</option>
					<option value="15">10-15万</option>
					<option value="20">15-20万</option>
					<option value="25">20-25万</option>
					<option value="50">25-50万</option>
					<option value="100">50-100万</option>
					<option value="500">100-500万</option>
					<option value="100">500万以上</option>
				</select>
				<button type="submit"  class="index-auto-btn fn-left" >搜索</button>
			</form>
		</div>
		<a href="{url('buyhelp/pictureList')}" class="more" title="更多" target="_blank">更多>></a>
		<ul class="index-title-tab fn-right fn-clear">
			<li class="active"><a href="{url('buyhelp/pictureList','cartypeid=1')}" target="_blank" title="选车">乘用车</a></li>
			<li><a href="{url('buyhelp/pictureList','cartypeid=2')}" target="_blank" title="选车">商用车</a></li>
			<li><a href="{url('buyhelp/pictureList','cartypeid=3')}" target="_blank" title="选车">房车</a></li>
			<li><a href="{url('buyhelp/pictureList','cartypeid=4')}" target="_blank" title="选车">新能源车</a></li>
		</ul>
	</div>
	<div class="prelative">
		<a class="icon-pre-gray" href="javascript:void(0)" title="上一组"></a>
		<a class="icon-next-gray" href="javascript:void(0)" title="下一组"></a>
		<div class="index-pics-wrap">
			<div id="J_SlideNewPic" class="index-pics-list fn-clear">
				{php $table = 'auto_picture_'.rand(0,9)}
				{php $carids = AutoCategoryModule::getCarbylevel(1)}
				{php $tag=Template::tag("table=$table&condition=status=1 and alid in(546) and arcid in ($carids) and title!='' and imgurl!= '' group by arcid &pagesize=7&order=rand(),edittime desc&template=null")}
				<div class="index-pics fn-left fn-clear">
					{php $top = array_shift($tag)}
					<div class="index-bigpic fn-left">
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="img">
							<img src="{Picture::thumb($top[imgurl],395,265)}"  alt="{$top[title]}">
						</a>
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="text-ellipsis">{$top[title]}</a>
					</div>
					<ul class="fn-right fn-clear">
						{php $toppic = array_splice($tag,0,6)}
						{loop $toppic $t}
						<li>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="img">
								<img src="{Picture::thumb($t[imgurl],165,130)}"  alt="{$t[title]}">
							</a>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="text-ellipsis">{$t[title]}</a>
						</li>
						{/loop}
					</ul>
				</div>
				{php $num = array(0=>0,1=>1,2=>2,3=>3,4=>4,5=>5,6=>6,9=>9)}
				{php $table = 'auto_picture_'.array_rand($num)}
				{php $carids = AutoCategoryModule::getCarbylevel(2)}
				{php $tag=Template::tag("table=$table&condition=status=1 and alid in(546) and arcid in ($carids) and title!='' and imgurl!= '' group by arcid &pagesize=7&order=rand(),edittime desc&template=null")}
				<div class="index-pics fn-left fn-clear">
					{php $top = array_shift($tag)}
					<div class="index-bigpic fn-left">
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="img">
							<img src="{Picture::thumb($top[imgurl],395,265)}"  alt="{$top[title]}">
						</a>
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="text-ellipsis">{$top[title]}</a>
					</div>
					<ul class="fn-right fn-clear">
						{php $toppic = array_splice($tag,0,6)}
						{loop $toppic $t}
						<li>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="img">
								<img src="{Picture::thumb($t[imgurl],165,130)}"   alt="{$t[title]}">
							</a>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="text-ellipsis">{$t[title]}</a>
						</li>
						{/loop}
					</ul>
				</div>
				<?php
					$carids = AutoCategoryModule::getCarbylevel(3);
					$sql = '';
					for($i=0;$i<10;$i++){
						$sql.= "(select arcid,imgurl,apid,title from ".$db->getPre()."auto_picture_".$i."
							where status=1  and alid in(546) and arcid in ($carids) and title!='' and imgurl!= '' group by arcid
							order by edittime desc limit 7)";
						if($i<9)$sql.= " UNION ";
					}
					$list = $db->getAll($sql);
					shuffle($list);
					$tag  = array_splice($list,0,7);
				?>
				<div class="index-pics fn-left fn-clear">
					{php $top = array_shift($tag)}
					<div class="index-bigpic fn-left">
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="img">
							<img src="{Picture::thumb($top[imgurl],395,265)}"  alt="{$top[title]}">
						</a>
						<a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="text-ellipsis">{$top[title]}</a>
					</div>
					<ul class="fn-right fn-clear">
						{php $toppic = array_splice($tag,0,6)}
						{loop $toppic $t}
						<li>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="img">
								<img src="{Picture::thumb($t[imgurl],165,130)}"  alt="{$t[title]}">
							</a>
							<a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="text-ellipsis">{$t[title]}</a>
						</li>
						{/loop}
					</ul>
				</div>
				<?php
					$carids = AutoCategoryModule::getCarbylevel(4);
					$sql = '';
					for($i=0;$i<10;$i++){
						$sql.= "(select arcid,imgurl,apid,title from ".$db->getPre()."auto_picture_".$i."
							where status=1  and alid in(546) and arcid in ($carids) and title!='' and imgurl!= '' group by arcid
							order by edittime desc limit 7)";
						if($i<9)$sql.= " UNION ";
					}
					$list = $db->getAll($sql);
					shuffle($list);
					$tag  = array_splice($list,0,7);
				 ?>
                <div class="index-pics fn-left fn-clear">
                    {php $top = array_shift($tag)}
                    <div class="index-bigpic fn-left">
                        <a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="img">
                            <img src="{Picture::thumb($top[imgurl],395,265)}"  alt="{$top[title]}">
                        </a>
                        <a href="{url('auto/pictureShow', 'carid='.$top['arcid'].'&pictureid='.$top['apid'])}" title="{$top[title]}" target="_blank" class="text-ellipsis">{$top[title]}</a>
                    </div>
                    <ul class="fn-right fn-clear">
                        {php $toppic = array_splice($tag,0,6)}
                        {loop $toppic $t}
                        <li>
                            <a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="img">
                                <img src="{Picture::thumb($t[imgurl],165,130)}"  alt="{$t[title]}">
                            </a>
                            <a href="{url('auto/pictureShow', 'carid='.$t['arcid'].'&pictureid='.$t['apid'])}" title="{$t[title]}" target="_blank" class="text-ellipsis">{$t[title]}</a>
                        </li>
                        {/loop}
                    </ul>
                </div>
			</div>
		</div>
	</div>
</div>
<!--最新图库 end-->